import { defHttp } from '/@/utils/http/axios';

export enum Api {
  list = '/sys/user/queryByOrgCodeForAddressList',
  positionList = '/sys/position/list',
  queryDepartTreeSync = '/sys/sysDepart/queryDepartTreeSync',
  exportXls = '/acti/publicSetting/exportXls',
  getUserHavePosition = '/acti/publicSetting/getUserHavePosition',
  refreshUserPositionUrl = '/acti/publicSetting/refreshUserPosition',
}
/**
 * 获取部门树列表
 */
export const queryDepartTreeSync = (params?) => defHttp.get({ url: Api.queryDepartTreeSync, params });
/**
 * 部门用户信息
 */
export const list = (params?) => defHttp.get({ url: Api.list, params });
/**
 * 职务list
 */
export const getPositionList = (params?) => defHttp.get({ url: Api.positionList, params });

export const getExportUrl = Api.exportXls;
/**
 * 获取员工已拥有和未拥有的职位列表
 * */
export const getUserHavePositionList = (params?) => defHttp.get({ url: Api.getUserHavePosition, params });

export const refreshUserPosition = (params?) => defHttp.post({ url: Api.refreshUserPositionUrl, params });
